<!DOCTYPE html>
<html>
<head>
    <title>货物类型表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">

        <div class="grid-btn">
            <div class="layui-row">
                <div class="layui-col-xs2">
                    <div class="layui-col-xs4 prop">
                        <span>类型名称</span>
                    </div>
                    <div class="layui-col-xs8 select-content">
                        <i-input v-model="search.typeName"  />
                    </div>
                </div>

                <!-- <div class="layui-col-xs3">
                     <div class="layui-col-xs3 prop">
                         <span>所属部门</span>
                     </div>
                     <div class="layui-col-xs9 select-content">
                         &lt;!&ndash;<i-input  v-model="search.departmentId"  />&ndash;&gt;
                         <Cascader :data="list" change-on-select  v-model="search.departmentId"></Cascader>
                     </div>
                 </div>-->

                <div class="layui-col-xs5">
                    <a class="btn btn-primary" @click="query"><i class="fa fa-search"></i>&nbsp;查询</a>
                    <a class="btn btn-primary" @click="reset"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                </div>
            </div>
            <div class="layui-row">
                <div class="layui-col-xs12">
                    <#if shiro.hasPermission("basics:bgoodstype:save")>
                        <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
                    </#if>
                    <#if shiro.hasPermission("basics:bgoodstype:info")>
                        <a class="btn btn-primary" @click="detail"><i class="fa fa-plus"></i>&nbsp;查看</a>
                    </#if>
                    <#if shiro.hasPermission("basics:bgoodstype:update")>
                        <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
                    </#if>
                    <#if shiro.hasPermission("basics:bgoodstype:delete")>
                        <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
                    </#if>
                 </div>
             </div>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <!--<form class="form-horizontal">
					<div class="form-group">
                        <div class="col-sm-2 control-label">类型名称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="bGoodsType.typeName" placeholder="类型名称"/>
                        </div>
                    </div>
					<div class="form-group">
                        <div class="col-sm-2 control-label">备注</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="bGoodsType.remark" placeholder="备注"/>
                        </div>
                    </div>
					
			<div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>-->
        <i-form  class="form-horizontal"  ref= 'bGoodsType' :model="bGoodsType"  :rules='ruleValidate' :label-width="80">

            <form-item label="类型名称" prop='typeName' >
                <i-input  v-model="bGoodsType.typeName" :readonly="isShow"  placeholder="请输入类型名称"></i-input>
            </form-item>

            <form-item label="是否启用" prop='unitCode' >
                <i-switch :disabled="isShow"  v-model="isUsed"  @on-change="changeUsed"  ></i-switch>
            </form-item>
            <form-item label="备注" prop="remark">
                <i-input v-model="bGoodsType.remark" :readonly="isShow"  type="textarea" v-autosize="{minRows: 2,maxRows: 5}"></i-input>
            </form-item>
            <form-item >
                <i-button type="primary" v-if="title!='详情'" @click="saveOrUpdate('bGoodsType')"  >确定</i-button>
                <i-button style="margin-left: 8px" @click="reload">返回</i-button>
            </form-item>

        </i-form>
    </div>
</div>

<script src="${request.contextPath}/statics/js/modules/basics/bgoodstype.js?_${.now?long}"></script>
</body>
<style>
    .prop{
        padding: 3%;
    }
    .select-content{
        padding: 1%;
    }
    .demo-spin-icon-load{
        animation: ani-demo-spin 1s linear infinite;
    }
</style>
</html>